package com.platform.dao.mybatis.impl;

import com.platform.dao.GroupDao;
import com.platform.dao.mybatis.mapper.GroupMapper;
import com.platform.domain.model.Group;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* Group
*
* User: wangyang
* DateTime: 2012-10-08 16:11:49
*
*/
@Service("groupDao")
public class GroupDaoImpl implements GroupDao {

    @Resource
    private GroupMapper groupMapper;

    /**
    *
    * 根据主键查询Group对象
    *
    * @param groupId
    * @return Group对象
    */
    @Override
    public Group selectByPrimaryKey(String groupId) throws Exception {
        return groupMapper.selectByPrimaryKey(groupId);
    }

    /**
    *
    * 根据查询条件查询符合条件的Group对象
    *
    * @param group
    * @return 符合条件的Group对象List
    */
    @Override
    public List<Group> select(Group group) throws Exception {
        return groupMapper.select(group);
    }

    /**
    *
    * 根据主键删除Group对象
    *
    * @param groupId
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(String groupId) throws Exception {
        return groupMapper.deleteByPrimaryKey(groupId);
    }

    /**
    *
    * 根据条件删除符合条件的Group对象
    *
    * @param group
    * @return 影响条件数
    */
    @Override
    public int delete(Group group) throws Exception {
        return groupMapper.delete(group);
    }

    /**
    *
    * 插入Group对象
    *
    * @param group
    * @return 影响条件数
    */
    @Override
    public int insert(Group group) throws Exception {
        return groupMapper.insert(group);
    }

    /**
    *
    * 更新Group对象
    *
    * @param group
    * @return 影响条件数
    */
    @Override
    public int update(Group group) throws Exception {
        return groupMapper.update(group);
    }
}
